package v1ch05.abstractClasses;

/**
 * 该程序演示了抽象类。
 *
 * @author Cay Horstmann
 * @version 1.01 2004-02-21
 */
public class PersonTest {
	public static void main(String[] args) {
		Person[] people = new Person[2];
		
		//用Student和Employee对象填充人员数组
		people[0] = new Employee("Harry Hacker", 50000, 1989, 10, 1);
		people[1] = new Student("Maria Morris", "computer science");
		
		//打印所有Person对象的名称和描述
		for (Person p : people)
			System.out.println(p.getName() + ", " + p.getDescription());
	}
}